package com.copa.gamestore.security.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author copa
 * @createDate 2022-09-22 12:03
 * @function Spring Security安全配置
 * 除xx目录的安全控制，避免Spring Security默认禁止HTTP缓存的行为
 */
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.headers().cacheControl().disable();
    }

    @Override
    public void configure(WebSecurity web) {
        //web.ignoring().antMatchers("/static/**");
    }
}
